install_headers(gdk_win32_public_headers, 'gdkwin32.h', subdir: 'gtk-4.0/gdk/win32/')
+GDK_WIN32_EGL_CFLAGS = []
+
+if win32_has_egl
+ GDK_WIN32_EGL_CFLAGS = ['-DGDK_WIN32_ENABLE_EGL']
+endif
+
gdk_win32_deps = [ # FIXME
pangowin32_dep
]
libgdk_win32 = static_library('gdk-win32',
gdk_win32_sources, gdkconfig, gdkenum_h,
include_directories: [confinc, gdkinc],
- c_args: ['-DGTK_COMPILATION', '-DG_LOG_DOMAIN="Gdk"', '-DINSIDE_GDK_WIN32'],
+ c_args: ['-DGTK_COMPILATION', '-DG_LOG_DOMAIN="Gdk"', '-DINSIDE_GDK_WIN32'] + GDK_WIN32_EGL_CFLAGS,
dependencies: [gdk_deps, gdk_win32_deps])
endif
pc_gdk_extra_libs += ['-lwinmm', '-ldwmapi', '-lsetupapi', '-lcfgmgr32']
backend_immodules += ['ime']
+
+ # Check whether libepoxy is built with EGL support on Windows
+ win32_has_egl = cc.links(
+ '''
+ #include <epoxy/egl.h>
+
+ int main(int argc, char *argv[])
+ {
+ EGLDisplay disp = EGL_NO_DISPLAY;
+
+ return epoxy_egl_version (disp);
+ }
+ ''',
+ dependencies : epoxy_dep,
+ name : 'libepoxy supports EGL on Windows'
+ )
endif
# Check for bind_textdomain_codeset, including -lintl if GLib brings it in by